import http from "~/utils/http";
export const getTest = data => {
  return http({
    url: "test/exam/mytest",
    method: "post",
    data
  });
};
export const saveTest = data => {
  return http({
    url: "test/exam/save",
    method: "post",
    data
  });
};
//题库
export const getQuestionBank = params => {
  return http({
    url: "questrepo/query-all",
    method: "get",
    params
  });
};
//试卷
export const getTestPaper = params => {
  return http({
    url: "client/testPaper/full",
    method: "get",
    params
  });
};
//试卷列表
export const getAllPaper = data => {
  return http({
    url: "client/test/paper/list",
    method: "post",
    data
  });
};
//我的试卷
export const getPaperMine = data => {
  return http({
    url: "client/paper/mine",
    method: "post",
    data
  });
};
//获取用户未开考或正在开考的试卷
export const getUserTestPaper = data => {
  return http({
    url: "client/user/paper",
    method: "post",
    data
  });
};
//试卷批改
export const sumbitTest = data => {
  return http({
    url: "client/paper/correct",
    method: "post",
    data
  });
};
//我的考试记录
export const paperTestList = data => {
  return http({
    url: "client/donepaper/list",
    method: "post",
    data
  });
};
//错题本
export const wrongQuestions = data => {
  return http({
    url: "client/paperItem/wq",
    method: "post",
    data
  });
};
//错题记录
export const wrongQuestionsSave = data => {
  return http({
    url: "client/wq/save",
    method: "post",
    data
  });
};

//我的考试-错题集
export const getMyWrongList = data => {
  return http({
    url: "client/testWrong",
    method: "post",
    data
  });
};
//我的考试-错题集- 错题
export const getMyWrongWq = data => {
  return http({
    url: "client/test/paperItem/wq",
    method: "post",
    data
  });
};
//获取我的考试数据
export const getMyTestList = data => {
  return http({
    url: "client/paper/mine/pc",
    method: "post",
    data
  });
};
//获取我的考试记录数据
export const getMyTestLog = data => {
  return http({
    url: "donePaperItem/queryAllByDonePaper",
    method: "post",
    data
  });
};